/*
 * Copyright 2010-2012 Susanta Tewari. <freecode4susant@users.sourceforge.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package gui.genomemap.tree;

import gui.genomemap.outputModel.OutputModel;

import javax.swing.tree.DefaultMutableTreeNode;

/**
 *
 * @author stewari1
 */
public class ViewTreeNode extends DefaultMutableTreeNode {

    /**
     *
     */
    public static final int TYPE_MODEL = 0;

    /**
     *
     */
    public static final int TYPE_LOG = 1;

    /**
     *
     */
    public static final int TYPE_MODEL_STAT = 2;

    /**
     *
     */
    public static final int TYPE_FIGURES = 3;

    /**
     *
     */
    public static final int TYPE_ROOT = 4;

    /**
     *
     */
    public static final int TYPE_CHROMOSOME = 5;

    /** Field description */
    private int type = 0;

    /** Field description */
    private String description = "default";

    /** Field description */
    private String toolTip = "default";

    /**
     * Constructs ...
     */
    ViewTreeNode() {}

    /**
     * Constructs ...
     *
     * @param userObject description
     */
    public ViewTreeNode(Object userObject) {
        super(userObject);
    }

    /**
     * Constructs ...
     *
     * @param userObject description
     * @param type description
     */
    ViewTreeNode(Object userObject, int type) {

        super(userObject);

        setType(type);
    }

    @Override
    public String toString() {
        return getDescription();
    }

    /**
     * must be overridden by the subclasses
     * @return
     */
    public OutputModel getOutputModel() {
        return null;
    }

    /**
     * must be overridden by the subclasses
     */
    void referesh() {}

    public int getType() {
        return type;
    }

    void setType(int type) {
        this.type = type;
    }

    public String getDescription() {
        return description;
    }

    void setDescription(String description) {
        this.description = description;
    }

    public String getToolTip() {
        return toolTip;
    }

    void setToolTip(String toolTip) {
        this.toolTip = toolTip;
    }
}
